<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PM部门详细信息</title>
<style>
.line{
	display: inline-block;
	width: 100px;
}
</style>
<link rel="stylesheet" href="${basepath}/css/pm.css" type="text/css">
</head>
<body>
	<div style="color:green;">
		${SHOW_MESSAGESS!""}
	</div>
	<div>
		<fieldset>
			<legend>部门基本信息</legend>
			<ul>
				<li><label>部门名称 : </label>${dept.deptName!""}</li>	
				<li><label>成员数量 : </label>${dept.pmusers?size}(人)</li>
				<li><label>部门明要 : </label>${dept.deptDesc!""}</li>	
			</ul>
		</fieldset>
	</div>
	<div>
		<fieldset>
			<legend>部门用户列表</legend>
			<ul>
				<#list dept.pmusers?sort_by("id") as user>
					<li class="line">${user.name!""}</li>	
				</#list>
			</ul>
		</fieldset>
	</div>
	<div>
		<fieldset>
			<legend>部门权限列表</legend>
			<ul>
				<#if SESSION_CURRENT_USER.isAdmin>
				<li style="float:right;">
					<input type="button" value="分配权限" onclick="javascript: distributionUserPower(${dept.id});"/>
				</li>
				</#if>
				<#list dept.deptPowers?sort_by("id") as deptpower>
					<li>${deptpower.pmpower.powerName!""}</li>	
				</#list>
			</ul>
		</fieldset>
	</div>
</body>
<script type="text/javascript" src="${basepath}/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="${basepath}/js/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript">
<#--分配权限-->
function distributionUserPower(deptId){
	$.get("${basepath}/power/dept/distribution.htm",{
		"deptId":deptId
	},function(data){
		$.dialog({
			title : "修改部门权限",
			content: data,
			max : false,
			min : false,
			resize : false,
			ok : function(){
				$("#distributiondeptpowerform").submit();
				return true;
			},
			cancelVal : '取消',
			cancel : true
		});
	});
};
</script>
</html>